<?php

/**
 * DocenteHistoricoSalario form base class.
 *
 * @package    form
 * @subpackage docente_historico_salario
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseDocenteHistoricoSalarioForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id_docente_historico_salario' => new sfWidgetFormInputHidden(),
      'id_docente'                   => new sfWidgetFormDoctrineChoice(array('model' => 'Docente', 'add_empty' => false)),
      'nu_salario'                   => new sfWidgetFormInput(),
      'dt_alteracao'                 => new sfWidgetFormDate(),
      'ds_cargo'                     => new sfWidgetFormInput(),
      'created_at'                   => new sfWidgetFormDateTime(),
      'updated_at'                   => new sfWidgetFormDateTime(),
      'deleted'                      => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'id_docente_historico_salario' => new sfValidatorDoctrineChoice(array('model' => 'DocenteHistoricoSalario', 'column' => 'id_docente_historico_salario', 'required' => false)),
      'id_docente'                   => new sfValidatorDoctrineChoice(array('model' => 'Docente')),
      'nu_salario'                   => new sfValidatorNumber(),
      'dt_alteracao'                 => new sfValidatorDate(),
      'ds_cargo'                     => new sfValidatorString(array('max_length' => 50)),
      'created_at'                   => new sfValidatorDateTime(array('required' => false)),
      'updated_at'                   => new sfValidatorDateTime(array('required' => false)),
      'deleted'                      => new sfValidatorBoolean(),
    ));

    $this->widgetSchema->setNameFormat('docente_historico_salario[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DocenteHistoricoSalario';
  }

}
